$webwork.htmlEncode($page.space.name) : Image Pyramid
This page last changed on Mar 08, 2007 by bowens.
OverviewA pyramid is several layers of the original image that have been shrunk down into smaller and smaller steps, each one to be rendered at different zoom levels. So, when you start zoomed out, you will view the smaller version of the original image. As you zoom in you will start to view versions of the original image that are getting larger and closer to the original image size.
Above, each layer is half the size of the previous layer; the starting image is the 20,000 kB image. Having the image divided into levels like that helps performance a lot, but only if we are zoomed out. As soon as we start zooming in we will start hitting the large original image (20,000 kB one). In order to speed up that layer, and some of the layers in between, we need to chop them up and create a mosaic out of them. This is called tiling. How this works is that only the tiles that are currently in the bounding box will be rendered. In the end, the pyramid will contain several layers of image mosaics. For a detailed tutorial on how to build an Image Pyramid from the Blue Marble dataset, visit this page. Directory StructureThe layout of your pyramid should look something like this: +pyramid/ +0/ +img_1.tiff +img_2.tiff +.... +pyramid.properties +... +2/ +4/ +8/ +16/ +pyramid.prj +pyramid.properties At the root of your image pyramid there will be a .properties and a .prj file. The properties file contains the bounds, file name, pixel size (levels), and directories containing the levels of the pyramid. Generating a Pyramid With the Coverage Tools.You can check out the source code and project for the coverage tools with SVN here: *http://svn.geotools.org/geotools/branches/2.3.x/* Make sure you have Maven installed, there are instructions on the developers guide for GeoServer for how to do that. mvn clean install Next, navigate to geotools/branches/2.3.x/ext/coverage_development and type: mvn clean install Then type: mvn eclipse:eclipse This will create an eclipse project you so can run the tools form the IDE. Next, start up Eclipse and import the project from the geotools/branches/2.3.x/ext/coverage_development directory. Create a a new Run... task with the following parameters: Main Class: it.geosolutions.utils.imagepyramid.PyramidBuilder Arguments: Program Arguments: -s path/to/tiffFile.tiff -f 2 -n 4 -t "1024,1024" -w VM Arguments: -Xmx512m -s is the path to your original TIFF file that will be shopped up. The path to the file can be the full path to the image file. Once the parameters are set up, run the program and it will generate your pyramid, hopefully without errors. Load the Pyramid Into GeoServer1) Start up GeoServer, then navigate to Config->Data->CoverageStores->New 2) Select Image Pyramidal Plugin then enter a name for your pyramid. Hit the New button. 3) You will now be at the CoverageStore edit screen. Enter in the location of the pyramid. If it is in the data directory, then it can be referenced relatively to it. If it is somewhere else on your file system, you can give it the absolute path. 4) Navigate to the Config->Data->Coverages-New menu: 5) Select your coverage store from the drop down list and hit New. 6) You are now at the Coverage edit screen. Simply scroll to the bottom and hit Submit, then Apply and Save. You will now be able to view the Pyramid through GeoServer. |
![]() |
Document generated by Confluence on Jan 16, 2008 23:27 |